<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        span,

        div {
            background-color: pink;
            height: 300px;
            width: 400px;
            float: left;
        }

        p {
            height: 600px;
            float: left;
            background-color: skyblue;
        }

        /* 如果行内元素有了浮动,则不需要转换块级\行内块元素就可以直接给高度和宽度 */
    </style>
</head>

<body>
    <span>1</span>
    <span>2</span>
    <span>3</span>
    <p>p(p没有规定宽度时，p的宽度取决于p里面的内容)</p>
    <div>div</div>
</body>

</html>